package cn.rxmind.dlog.db.starter.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 *
 * @description 数据源配置项
 *
 * @author renxin
 * @email renxinzhiliangzhi@163.com
 * @date 2020/7/13 3:38 下午
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "dlog.db.datasource")
public class DataSourceProperties {

    private String driverClassName = "com.mysql.cj.jdbc.Driver";
    private String url = "jdbc:mysql://127.0.0.1:3306/dlog?characterEncoding=UTF-8&useSSL=false";
    private String username = "root";
    private String password = "123456";

    private int initialSize=5;
    private int maxActive = 8;
    private long maxWait = 30*1000L;
    private boolean poolPreparedStatements = false;
    private int maxOpenPreparedStatements = 10;
    private String validationQuery = "SELECT 1 FROM DUAL";
    private boolean testOnBorrow = false;
    private boolean testOnReturn = false;

}
